﻿module lang.d.sts.declarations.dautodeclaration;

import lang.d.sts.declarations.ddeclaration;
import lang.d.sts.expressions.dexpression;
import lang.d.visitors.dvisitor;

class DAutoDeclaration: DDeclaration {
    private string myName;
    private DExpression myInitializer;

    public this(string name, DExpression initializer, uint attribute)
    in {
        assert(initializer !is null);
    }
    body {
        super(attribute);
        myName = name;
        myInitializer = initializer;
        myInitializer.setParent(this);
    }

    public string getName() const {
        return myName;
    }

    override void accept(DVisitor visitor) {
        visitor.visitAutoDeclaration(this);
    }
}
